﻿using System;

namespace Kay.Communication.Framework.Custom_EventArgs
{
    /// <summary>
    /// 为收到文本消息事件提供数据
    /// </summary>
    public class TextMessageReceivedEventArgs : EventArgs
    {
        /// <summary>
        /// 初始化收到文本消息事件数据
        /// </summary>
        /// <param name="user">发送者信息</param>
        /// <param name="value">文本内容</param>
        public TextMessageReceivedEventArgs(ContactsInfo user, string value)
        {
            if (user == null) throw new ArgumentNullException("user");
            UserInfo = user;
            Text = value;
        }

        /// <summary>
        /// 发送者用户信息
        /// </summary>
        public ContactsInfo UserInfo { get; set; }

        /// <summary>
        /// 文本内容
        /// </summary>
        public string Text { get; set; }
    }
}